package cn.lg.controller;

import cn.lg.domain.User;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;

/**
 * 用户服务的接口
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @Value("${server.port}")
    private String port;


    @GetMapping("/test")
    public String test(){
        return "Hello Eureka ";
    }

    @GetMapping("/getUserById/{id}")
    public User getUser(@PathVariable("id")Long id){
        return new User(id,"时光鸡","有节操的鸡:"+port);
    }




}